﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using Sharp3DMath.Strokes;
using System.Text;
using System.Windows.Forms;

namespace SketchRecognise
{


    public partial class GlobalFeaturesPanel : UserControl
    {
        public GlobalFeaturesPanel()
        {
            InitializeComponent();
        }
        //Todo 16日工作
        public void LoadFrom(GlobalGeometricFeature globalFeature)
        {
            StrokeFeaturesBase featureBase = new StrokeFeaturesBase();
            featureBase.ComputeFeatures(globalFeature);
            tb_Hollowness.Text = featureBase.Hollowness.ToString();
            tb_Pch2_Ach4PI.Text = featureBase.Pch2_Ach4PI.ToString();
            tb_Her_Wer.Text = featureBase.Her_Wer.ToString();
            tb_Tl_Pch.Text = featureBase.Tl_Pch.ToString();
            tb_Ach_Aer.Text = featureBase.Ach_Aer.ToString();
            tb_Alq_Ach.Text = featureBase.Alq_Ach.ToString();
            tb_Plt_Pch.Text = featureBase.Plt_Pch.ToString();
            tb_Alt_Ach.Text = featureBase.Alt_Ach.ToString();
            tb_Alq_Aer.Text = featureBase.Alq_Aer.ToString();
            tb_Plq_Pch.Text = featureBase.Plq_Pch.ToString();
            tb_Alt_Alq.Text = featureBase.Alt_Alq.ToString();
            tb_Alt_Aer.Text = featureBase.Alt_Aer.ToString();
        }
        public void LoadFrom(StrokeFeaturesBase featureBase)
        {
            tb_Hollowness.Text = featureBase.Hollowness.ToString("f7");
            tb_Pch2_Ach4PI.Text = featureBase.Pch2_Ach4PI.ToString("f7");
            tb_Her_Wer.Text = featureBase.Her_Wer.ToString("f7");
            tb_Tl_Pch.Text = featureBase.Tl_Pch.ToString("f7");
            tb_Ach_Aer.Text = featureBase.Ach_Aer.ToString("f7");
            tb_Alq_Ach.Text = featureBase.Alq_Ach.ToString("f7");
            tb_Plt_Pch.Text = featureBase.Plt_Pch.ToString("f7");
            tb_Alt_Ach.Text = featureBase.Alt_Ach.ToString("f7");
            tb_Alq_Aer.Text = featureBase.Alq_Aer.ToString("f7");
            tb_Plq_Pch.Text = featureBase.Plq_Pch.ToString("f7");
            tb_Alt_Alq.Text = featureBase.Alt_Alq.ToString("f7");
            tb_Alt_Aer.Text = featureBase.Alt_Aer.ToString("f7");
        }
    }
}
